<?php echo $this->Form->create('Module', array('default' => false, 'id' => 'modules-form', 'url' => array('controller' => 'Administration', 'action' => 'add'),'inputDefaults' => array('label' => false,'div' => false)));?>
       <div class="pane-header">
           Modules Management
       </div>
       <br />
       <div id="config-details-box" style="float:left; width: 60%;">
              <div class="pane-sub-header">
                     <strong>Modules Configuration</strong>
              </div>
              <div id="details-form-window">
                  <table width="100%">
                    <thead><th> Module Name</th><th> Enable / Disable</th></thead>
                    <tbody>
                      <?php
                        if(!empty($allConfigModules)){
                            foreach($allConfigModules as $moduleConfigKey => $moduleConfigValue){
                                $moduleConfigID = $moduleConfigValue['id']; 
                                $moduleConfigName = $moduleConfigValue['name']; 
                                $moduleConfigActive = $moduleConfigValue['active'];
                                
                                $checkedStatus = false;
                           
                                if($moduleConfigActive == 1){
                                    $checkedStatus = true;
                                } 
                             ?>
                                <tr><td><?php echo $moduleConfigName; ?></td><td> <?php echo $this->Form->input("Module.$moduleConfigKey.id", array('type'=>'hidden','label' => false, 'value'=>"$moduleConfigID")); ?>  <?php echo $this->Form->input("Module.$moduleConfigKey.active", array('type'=>'checkbox', 'div' => false, 'label' => false, 'class' => '', 'value'=>'1', 'checked'=>$checkedStatus)); ?> </td></tr>
                             <?php
                            }
                        }
                        else{
                           ?>
                                 <tr><td>No Modules Available</td></tr>
                           <?php 
                        }
                      ?>
                    </tbody>
                  </table>
              </div>
       </div>
       <div id="config-actions-buttons">
                 <?php echo $this->Form->button($this->Html->image('ico-49.gif', array('width' => '16', 'height' => '16', 'align' => 'left', 'border' => '0')).'&nbsp;Save Settings', array('div' => false, 'label' => false, 'class' => 'save','id' => 'modules-save-btn', 'type'=>'submit')); ?>
              
        </div>
 <?php echo $this->Form->end();?>
   </form>